
package com.jiawei.note.base;

import android.os.Bundle;

import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jiawei.note.R;


public abstract class BaseFragment<VDB extends ViewDataBinding> extends Fragment {
    protected VDB binding;
    public BaseFragment() {

    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        binding = DataBindingUtil.inflate(inflater,getLayout(),container,false);
        return binding.getRoot();
    }

    public abstract int getLayout();
    public abstract void initData();
    public abstract void initListener();
}